The invention relates to electronic devices, and, more particularly, to computer algebra systems and methods.
Computer algebra systems, which can be found on advanced calculators, personal computers, and other such systems, perform various tasks such as simplifying algebraic expressions, differentiating and integrating simple functions, solving simple differential equations, and so forth. That is, algebraic expressions such as (x+1)2xe2x88x92(xxe2x88x921)2 typically will be automatically simplified to 4x and these two expressions are equivalent for all values of the variable x. However, many computer algebra systems will automatically simplify algebraic expressions to nonequivalent expressions without warning; for example, ln(xy)xe2x88x92ln(x) could be simplified to ln(y). But for negative x and y this simplification yields incorrect results: for x=xe2x88x921=y, ln(xy)xe2x88x92ln(x)=ln(1)xe2x88x92ln(xe2x88x921)=xe2x88x92"igr"xcfx80, whereas ln(y)=ln(xe2x88x921)="igr"xcfx80.
Various known computer algebra systems attempt to avoid simplifications which yield nonequivalent expressions. Indeed, the computer algebra system could simplify an expression only when the variables are constrained (as by the user) to insure the transformed expression will be equivalent. For example, a constraint that at least one of the variables x and y is positive is sufficient for ln(xy)xe2x88x92ln(x) to be simplified to ln(y). But this requires the user to anticipate the problem.
Other computer algebra systems approach the nonequivalent expression difficulty by querying the user for constraints which will insure equivalency. But such as system may force the user to repeatedly submit input with all possible combinations of replies to obtain a complete solution, and many combinations might lead to the same result, which is frustrating for the user. Moreover, such queries can arise for internally generated variables for which the user has no knowledge. For example, a differential equation solver that tries many methods including the Laplace transform method might ask the user about the sign of s (the transform variable) when there is no such variable in the user""s input. Such queries can be totally baffling to users. Finally, interactive queries are totally inappropriate for batch computation and for such lengthy interactive computations that the user wants to leave the machine running and then return to see the final result after a lengthy period of time.
An alternative approach computes a domain of definition for each algebraic expression (together with any user-supplied constraints on the variables"" domains) and outputs a domain of definition together with a simplified expression. For example, the input expression xe2x80x9c√xxe2x88x92√x such that x greater than xe2x88x923xe2x80x9d where x greater than xe2x88x923 is a user supplied constraint of the variable x, would result in an output xe2x80x9c0 such that xxe2x89xa70xe2x80x9d. Note that the constraints xxe2x89xa70 (from the domain of definition of √) and x greater than xe2x88x923 were combined. See the method of Dolzmann et al, Guarded Expressions in Practice, Proc. 1997 Intl. Symp. Symbolic and Algebraic Computation, pp. 376-382 (ACM NY, N.Y.; ISBN 0-89791-875-4), which provides an output of possibly several conventional expressions guarded by quantifier-free formulas. However, this involves unnecessary computation and often results in a cluttered display of results.
The present invention provides computer algebra systems with domain preservation constraints displayed with a transformed expression which has an apparent domain of definition differing from the domain of definition of the original expression.
This has advantages including elimination of extraneous displays of constraints and/or extraneous domain of definition computations.